# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ktrip
pkgver=22.06
pkgrel=0
pkgdesc="A public transport assistant"
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by qqc2-desktop-style
arch="all !armhf !s390x !riscv64"
url="https://invent.kde.org/utilities/ktrip"
license="GPL-2.0-only OR GPL-3.0-only"
depends="
	kde-icons
	kirigami-addons
	kirigami2
	"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcontacts-dev
	ki18n-dev
	kitemmodels-dev
	kpublictransport-dev
	qqc2-desktop-style-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtquickcontrols2-dev
	samurai
	"
source="https://download.kde.org/stable/plasma-mobile/$pkgver/ktrip-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DKF_IGNORE_PLATFORM_CHECK=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
dd64541739b4acdabca6847eefe11e9227e5bcd9f9f801a5ae981d38fb9c64baa793361fd37399f17682a81f0930073918a07d25739f7865f485ee8f31520ad1  ktrip-22.06.tar.xz
"
